<%@ Control Language="C#" ClassName="StateFlowActions" Inherits="Dimok.Web.UI.TableControl" %>
<%@ Register Namespace="Dimok.Web.UI"  Assembly="Dimok.Web.UI" TagPrefix="OR"  %>
<%@ Register Namespace="Data.DataSources" Assembly="App_Code" TagPrefix="DS"  %>

<script runat="server">
</script>

<asp:UpdatePanel ID="pnlRebateOffers" UpdateMode="Always" runat="server">
	<ContentTemplate>
		<OR:GridViewEx ID="grv" runat="server" AutoGenerateColumns="False" DataSourceID="ds"
			ShowFooter="True" AllowSorting="True" BackColor="Window" CellPadding="0" EnableTheming="True"
			Font-Names="verdana" EnableViewState="False" DataKeyNames="ID"
			ViewNameUpdate="ts_StateFlowAction" ViewNameInsert="ts_StateFlowAction"
			>
			<Columns>

				<!-- #include virtual = "~/Controls/_FieldTemplates/ID_.txt" -->
				<!-- #include virtual = "~/Controls/_FieldTemplates/Name.txt" -->

				<asp:TemplateField HeaderText="Text" SortExpression="Text">
					<ItemTemplate><PRE style="margin:0px"><%#Eval("Text") %></PRE></ItemTemplate>
					<EditItemTemplate><asp:TextBox ID="txtText" Text='<%# Bind("Text") %>' runat="server" TextMode="MultiLine" /></EditItemTemplate>
					<FooterTemplate><asp:TextBox ID="Text" Text='<%# Bind("Text") %>' runat="server" /></FooterTemplate>
				</asp:TemplateField>

				<asp:TemplateField HeaderText="Description" SortExpression="Description">
					<ItemTemplate><PRE style="margin:0px"><%#Eval("Description") %></PRE></ItemTemplate>
					<EditItemTemplate><asp:TextBox ID="txtDescription" Text='<%# Bind("Description") %>' TextMode="MultiLine" runat="server" /></EditItemTemplate>
					<FooterTemplate><asp:TextBox ID="Description" runat="server" TextMode="MultiLine" /></FooterTemplate>
				</asp:TemplateField>

				<asp:TemplateField HeaderText="ActionType" SortExpression="StateFlowActionType">
					<ItemTemplate><asp:Label Text='<%#Eval("StateFlowActionType") %>' runat="server" /></ItemTemplate>
					<EditItemTemplate>
						<asp:DropDownList ID="selActionTypes" DataSourceID="dsActionTypes" DataTextField="Name" DataValueField="ID" runat="server"
								 SelectedValue='<%# Bind("StateFlowActionTypeID") %>'></asp:DropDownList>
					</EditItemTemplate>
					<FooterTemplate>
						<asp:DropDownList ID="StateFlowActionTypeID" DataSourceID="dsActionTypes" DataTextField="Name" DataValueField="ID" runat="server"></asp:DropDownList>
					</FooterTemplate>
				</asp:TemplateField>

			</Columns>
		</OR:GridViewEx>
	</ContentTemplate>
</asp:UpdatePanel>

<DS:StateFlowActionsDataSource ID="ds" runat="server" />
<DS:StateFlowActionTypesDataSource ID="dsActionTypes" runat="server" />
